<section class="activity wrapper">
  <div class="news-wrapper">
    <div class="news-tip">
      <h2>NEWS</h2><a href="/news">ALL News</a>
    </div>
    {% for i in range(0, 3) -%}
      {% if news[i] %}
        <a href="/news?id={{ news[i].newsid }}">
          <div class="new-item pointer">
            <img src="{{news[i].picture | default('../public/img/image_demo.png', true)}}" alt="">
            <p>{{ news[i].newstitle }}</p>
            <span>{{ news[i].newsdate | timeEnFilter }}</span>
          </div>
        </a>
      {% endif %}
    {% endfor %}
    <!--{% for new in news %}-->
    <!--<a href="/news?id={{ new.newsid }}">-->
      <!--<div class="new-item pointer">-->
          <!--<img src="../public/img/image_demo.png" alt="">-->
        <!--<p>{{ new.newstitle }}</p>-->
        <!--<span>10 MAR 2020</span>-->
      <!--</div>-->
    <!--</a>-->
    <!--{% else %}-->
    <!--<p>暂无。。。</p>-->
    <!--{% endfor %}-->
    <!--old-->
    <!--<a href="/news">-->
      <!--<div class="new-item">-->
        <!--<img src="../public/img/image_demo.png" alt="">-->
        <!--<p>test</p>-->
        <!--&lt;!&ndash;<p>Chen creceived a new paper from the MBL team</p>&ndash;&gt;-->
        <!--<span>10 MAR 2020</span>-->
      <!--</div>-->
    <!--</a>-->
  </div>
  <div class="events-wrapper">
    <div class="events-tip">
      <h2>EVENTS</h2><a href="/events">ALL Events</a>
    </div>

    {% for i in range(0, 2) %}
    {% if events[i] %}
    <a href="/events?id={{ events[i].eventid }}">
      <div class="event-item pointer">
      <span class="event-time">
        <span class="day">{{ events[i].eventdate | dayFilter }}</span>
        <span class="month">{{ events[i].eventdate | monthFilter }}</span>
      </span>
        <div class="event-detail">
          <h3>{{ events[i].eventtitle }}</h3>
          <p>{{ events[i].address }}</p>
          <span>{{ events[i].eventdate }}</span>
        </div>
      </div>
    </a>
    {% endif %}
    {% endfor %}

    <!--{% for event in events %}-->
    <!--<a href="/event?id={{ event.eventid }}">-->
    <!--<div class="event-item pointer">-->
      <!--<span class="event-time">-->
        <!--<span class="day">10</span>-->
        <!--<span class="month">MAR</span>-->
      <!--</span>-->
      <!--<div class="event-detail">-->
        <!--<h3>{{ event.eventtitle }}</h3>-->
        <!--<p>{{ event.address }}</p>-->
        <!--<span>{{ event.eventdate }}</span>-->
      <!--</div>-->
    <!--</div>-->
    <!--</a>-->
    <!--{% else %}-->
    <!--<p>暂无。。。</p>-->
    <!--{% endfor %}-->
    <!--old-->
    <!--<div class="event-item">-->
      <!--<span class="event-time">-->
        <!--<span class="day">10</span>-->
        <!--<span class="month">MAR</span>-->
      <!--</span>-->
      <!--<div class="event-detail">-->
        <!--<h3>lecture by professor shiyi of Peking University</h3>-->
        <!--<p>Specific location of the meeting</p>-->
        <!--<span>7:30-9:30</span>-->
      <!--</div>-->
    <!--</div>-->
  </div>
</section>
